/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.kramerius.fedoraaccess.exception;

import cz.mzk.kramerius.commons.DatastreamId;

/**
 *
 * @author Martin Řehánek <rehan at mzk.cz>
 */
public class DatastreamNotFoundException extends Exception {

    private final String pid;
    private final DatastreamId dsId;

    /**
     * Creates a new instance of
     * <code>DatastreamNotFoundException</code> with the specified detail
     * message.
     *
     * @param pid persistant identifier of the object
     * @param dsId identifier of datastream
     */
    public DatastreamNotFoundException(String pid, DatastreamId dsId) {
        super("Datastream " + dsId.toString() + " of object " + pid + " not found");
        this.pid = pid;
        this.dsId = dsId;
    }

    /**
     * @return persistant identifier of the object
     */
    public String getPid() {
        return pid;
    }

    /**
     *
     * @return identifier of datastream
     */
    public DatastreamId getDsId() {
        return dsId;
    }
}
